package com.uwlaser.service;

import com.uwlaser.base.CommonService;
import com.uwlaser.domain.FactoryModel;
import com.uwlaser.domain.FactoryTreePathInfo;
import com.uwlaser.service.dto.FactoryTreePathInfoDto;
import com.uwlaser.service.dto.FactoryTreePathInfoQueryParam;

import java.util.List;
import java.util.Set;

/**
* @author Hongchuangbin
* @date 2022-05-20
*/
public interface FactoryTreePathInfoService extends CommonService<FactoryTreePathInfo>  {

    static final String CACHE_KEY = "factoryTreePathInfo";

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<FactoryTreePathInfoDto>
    */
    List<FactoryTreePathInfoDto> queryAll(FactoryTreePathInfoQueryParam query);

    /**
    * 查询所有父节点(传descendant)或子节点(传ancestor)
    * @param query 条件参数
    * @return List<FactoryTreePathInfoDto>
    */
    List<FactoryModel> queryAllFamily(FactoryTreePathInfo query);

    FactoryTreePathInfo getById(Integer id);
    FactoryTreePathInfoDto findById(Integer id);

    /**
     * 插入一条新数据。
     */
    int insert(FactoryTreePathInfoDto resources);
    int removeById(Integer id);
    int removeByIds(Set<Integer> ids);
}
